package com.edu.admin.entity;


import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

import com.edu.admin.common.BaseEntity;

/**
 * 学科表实体
 * 
 * @author Wangjiong
 *
 */
@Table(name = "sys_subject")
public class SysSubject extends BaseEntity {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 5940952806894820949L;
	/**
	 * id
	 * 
	 */
	@Id
	@GeneratedValue(generator = "JDBC")
	private Long subjectId;
	/**
	 * 学科名称
	 * 
	 */
	@NotBlank(message = "学科名称不能为空")
	private String subjectName;
	/**
	 * 学段Id
	 * 
	 */
	@Min(value = 1, message = "学段不能为空") 
	private Long phaseId;
	/**
	 * 排序编号
	 */
	@Min(value = 0, message = "排序编码大于0") 
	private Integer sortNum;
	/**
	 * 学段名称
	 * 
	 */
	@Transient
	private String phaseName;

	public Long getSubjectId() {
		return subjectId;
	}

	public void setSubjectId(Long subjectId) {
		this.subjectId = subjectId;
	}

	public String getSubjectName() {
		return subjectName;
	}

	public void setSubjectName(String subjectName) {
		this.subjectName = subjectName;
	}

	public Long getPhaseId() {
		return phaseId;
	}

	public void setPhaseId(Long phaseId) {
		this.phaseId = phaseId;
	}

	public Integer getSortNum() {
		return sortNum;
	}

	public void setSortNum(Integer sortNum) {
		this.sortNum = sortNum;
	}

	public String getPhaseName() {
		return phaseName;
	}

	public void setPhaseName(String phaseName) {
		this.phaseName = phaseName;
	}
	

}
